<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :footer="null"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-card >
        <a-row>
          <a-col :span="3" class="title">生产订单编号:</a-col>
          <a-col :span="5">{{record.ipoNo}}</a-col>
          <a-col :span="3" class="title">采购方总部编码:</a-col>
          <a-col :span="5">{{record.puchaserHqCode}}</a-col>
          <a-col :span="3" class="title">供应商编号:</a-col>
          <a-col :span="5">{{record.supplierCode}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">产品:</a-col>
          <a-col :span="5">{{record.insideNo}}</a-col>
          <a-col :span="3" class="title">设备编号:</a-col>
          <a-col :span="5">{{record.deviceNo}}</a-col>
          <a-col :span="3" class="title">生产批次号:</a-col>
          <a-col :span="5">{{record.productBatchNo}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">工序数据:</a-col>
          <a-col :span="5">{{record.processName}}</a-col>
          <a-col :span="3" class="title">订单状态:</a-col>
          <a-col :span="5">
            <span v-if="record.ipoStatus=='1'">创建</span>
            <span v-if="record.ipoStatus=='2'">生产中</span>
            <span v-if="record.ipoStatus=='4'">产品入库</span>
          </a-col>
          <a-col :span="3" class="title">客户所属省份:</a-col>
          <a-col :span="5">{{record.buyerProvince}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">计划开始时间:</a-col>
          <a-col :span="5">{{record.planStartTime}}</a-col>
          <a-col :span="3" class="title">计划结束时间:</a-col>
          <a-col :span="5">{{record.planEndTime}}</a-col>
          <a-col :span="3" class="title">实际开始时间:</a-col>
          <a-col :span="5">{{record.actualStartTime}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">实际结束时间:</a-col>
          <a-col :span="5">{{record.actualEndTime}}</a-col>
          <a-col :span="3" class="title">工序名称:</a-col>
          <a-col :span="5">{{record.processName}}</a-col>
          <a-col :span="3" class="title">工序编码:</a-col>
          <a-col :span="5">{{record.processNo}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">生产工艺路线编码:</a-col>
          <a-col :span="5">{{record.processCode}}</a-col>
          <a-col :span="3" class="title">生产车间编码:</a-col>
          <a-col :span="5">{{record.workshopCode}}</a-col>
          <a-col :span="3" class="title">生产工单编号:</a-col>
          <a-col :span="5">{{record.woNo}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">生产车间名称:</a-col>
          <a-col :span="5">{{record.workshopName}}</a-col>
          <a-col :span="3" class="title">数据来源:</a-col>
          <a-col :span="5">{{record.dataSource}}</a-col>
          <a-col :span="3" class="title">数据创建时间:</a-col>
          <a-col :span="5">{{record.dataSourceCreateTime}}</a-col>
        </a-row>
        <a-row class="rows"  >
          <a-col :span="3" class="title">是否推送:</a-col>
          <a-col :span="5" v-if="record.ioflag=='1'">否</a-col>
          <a-col :span="5" v-else>是</a-col>
          <a-col :span="3" class="title">推送时间:</a-col>
          <a-col :span="5">{{record.pushTime}}</a-col>
        </a-row>
      </a-card>
    </a-spin>
    <div style="text-align: center;margin-top: 10px">
      <a-button type="primary" @click="()=>this.visible = false">关闭</a-button>
    </div>
  </a-modal>
</template>

<script>


  export default {
    name: "ZxjEipBgModal",
    components: { 
    },
    record:{},
    data () {
      return {
        title:"操作",
        width:1050,
        confirmLoading: false,
        visible: false,
        model: {},
      }
    },
    created () {

    },
    methods: {
      close () {
        this.$emit('close');
        this.visible = false;
      },
      addModal (record) {
//        if (record.ipoStatus){
//          if (record.ipoStatus=='1'||record.ipoStatus=='2') {
//            this.current= parseInt(record.ipoStatus)-1;
//          }else {
//            this.current=parseInt(record.ipoStatus)-2;
//          }
//        }
        this.record=record;
        this.visible = true;
      },
      handleCancel () {
        this.close()
      }
    }
      
  }
</script>
<style scoped>
  @import '~@assets/less/detail.less'
</style>